package me.yobol.greentable.commons.path;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Yobol
 * 
 * s : Servlet
 * p(page) : Html / Jsp
 * c : Css
 * j : JavaScript
 * r : resource
 *
 */
public class PPath {
	
	public static String PAGE_FOLDER = "/pages/";
	
	public static String getPagePath(HttpServletRequest request, String pageName){
		return request.getContextPath() + PAGE_FOLDER + pageName;
	}
	
	public static String pIndex(HttpServletRequest request){
		return request.getContextPath() + "/index.jsp";
	}
	
	public static String pHeader(HttpServletRequest request){
		return getPagePath(request, "header.jsp");
	}
	
	public static String pMain(HttpServletRequest request){
		return getPagePath(request, "main.jsp");
	}
	
	public static String pFooter(HttpServletRequest request){
		return getPagePath(request, "footer.jsp");
	}

	public static String pLogin(HttpServletRequest request){
		return getPagePath(request, "login.jsp");
	}
	
	public static String pRegister(HttpServletRequest request){
		return getPagePath(request, "register.jsp");
	}
	
	public static String pDishes(HttpServletRequest request){
		return getPagePath(request, "dishes.jsp");
	}
	
	public static String pDishesList(HttpServletRequest request){
		return getPagePath(request, "dishes_list.jsp");
	}
	
	public static String pCreateDishes(HttpServletRequest request){
		return getPagePath(request, "create_dishes.jsp");
	}
	
	public static String pModifyDishes(HttpServletRequest request,String params){
		return getPagePath(request, "modify_dishes.jsp" + params);
	}
	
	public static String pIngredient(HttpServletRequest request){
		return getPagePath(request, "ingredient/ingredient.jsp");
	}
	
	public static String pIngredientList(HttpServletRequest request){
		return getPagePath(request, "ingredient/ingredient_list.jsp");
	}
	
	public static String pCreateIngredient(HttpServletRequest request){
		return getPagePath(request, "ingredient/create_ingredient.jsp");
	}
	
	public static String pModifyIngredient(HttpServletRequest request,String params){
		return getPagePath(request, "ingredient/modify_ingredient.jsp" + params);
	}
	
	public static String pCart(HttpServletRequest request){
		return getPagePath(request, "cart.jsp");
	}
	
	public static String pOrder(HttpServletRequest request){
		return getPagePath(request, "order.jsp");
	}
}
